Skip to main content
Version: 1.3.4

LOR API Documentation

Directory APIs

Root Directory Retrieval Endpoint

  • Method: GET
  • Path: https://api.kadal.ai/cl/api/v1/directory/root
  • Summary: Gets the root directory for the current tenant.

Description

Returns the root directory information for a tenant if it exists.

Request

  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referencestringUUIDsoptional

Response

{
"status_code": "200",
"message": "Root directory found",
"data": [{
"name": "root_ABC12",
"folder_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"type": "Folder",
"is_private": false,
"custom_metadata": {}
}]
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v1/directory/root"
token = "YOUR_TOKEN"

headers = {
"Authorization": f"Bearer {token}"
}

response = requests.get(url, headers=headers)
print(response.json())

Root Directory Creation Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v1/directory/root
  • Summary: Creates a root directory for a tenant.

Description

Creates a root directory for a tenant. The root directory will be named as root_{tenant_code}.

Request

  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referencestringUUIDsoptional
FieldTypeDescriptionValidation
tenant_codestringTenant identifier5 character alphanumeric code

Response

{
"status_code": "201",
"message": "Successfully created root directory"
}
  • Other Responses
    • 409 Conflict: Can't create duplicate root directory

Usage

import requests

url = "https://api.kadal.ai/cl/api/v1/directory/root"
headers = {
"Authorization": "Bearer <your_token>"
}
payload = {
"tenant_code": "ABC12"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Directory Retrieval Endpoint

  • Method: GET
  • Path: https://api.kadal.ai/cl/api/v1/directory/{folder_id}
  • Summary: Gets information about a specific directory.

Description

Gets folder information for a specific directory and shows information for all children present inside the requested directory.

Request

  • Query Parameters
    • folder_id (path): UUID of the directory to retrieve
    • sorting_by (query, optional): Sort result by title or modified_date (default: updated_at)
    • order (query, optional): Sort order (asc/desc, default: asc)
    • ext_user_id_ref (query, optional): External user ID reference

Response

{
"status_code": "200",
"message": "Child directory found.",
"data": [{
"name": "Directory Name",
"folder_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"type": "Folder",
"is_private": false,
"custom_metadata": {},
"children": []
}]
}

Directory Metadata Update Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v1/directory/{folder_id}
  • Summary: Updates metadata of a directory.

Description

Updates metadata of a directory (non-root directories only). Usage rules:

  1. This API updates only the metadata of an existing directory — it does not add or remove child directories.
  2. To replace a directory structure, use the DELETE /{folder_id} API first, then POST /{parent_id} to recreate it.
  3. All fields are optional, but at least one must be provided.
  4. To clear all custom metadata, pass custom_metadata as an empty object {}.
  5. To clear individual fields: pass tags as [], kvp as [], taxonomy as [].

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
folder_idUUID of the directory to updateString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo
ParameterDescriptionData TypeAllowed ValuesRequired
nameDirectory display nameStringNo
is_privatePrivacy flagBooleantrue, falseNo
typeDirectory typeStringFolder, Module, etc.No
descriptionDirectory descriptionStringNo
custom_metadataCustom metadata objectObject{ tags: [], kvp: [], taxonomy: [] }No
{
"name": "Folder 1",
"is_private": false,
"type": "Folder",
"description": "Updated description",
"custom_metadata": {
"tags": [],
"kvp": [],
"taxonomy": []
}
}

Response

{
"status_code": "200",
"message": "Sucessfully updated child directory"
}
  • Other Responses
    • 400 Connection error
    • 403 Forbidden
    • 404 Not found
    • 409 Conflict
    • 422 Validation Error
    • 500 Internal server error

Usage

import requests

folder_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/directory/{folder_id}"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

payload = {
"name": "Updated Folder",
"is_private": False,
"type": "Folder",
"description": "Updated description",
"custom_metadata": {
"tags": [],
"kvp": [],
"taxonomy": []
}
}

response = requests.put(url, headers=headers, json=payload)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Child Directories Addition Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v1/directory/{folder_id}
  • Summary: Add one or more directories to an existing directory.

Description

Adds one or more directories to a parent directory. The parent directory can be a root directory or any other existing directory. A complete nested directory structure can be created in a single request using the children array. custom_metadata is optional; if not provided, it defaults to an empty object.

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
folder_idUUID of the parent directoryString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo
ParameterDescriptionData TypeAllowed ValuesRequired
directory_structureArray of directory objects to createArray of ObjectsYes
directory_structure[].nameDirectory display nameStringYes
directory_structure[].is_privatePrivacy flagBooleantrue, falseNo
directory_structure[].typeDirectory typeStringFolder, Module, etc.No
directory_structure[].project_idAssociated project IDStringUUIDNo
directory_structure[].descriptionDirectory descriptionStringNo
directory_structure[].childrenNested child directoriesArrayNo
directory_structure[].custom_metadataCustom metadataObjectNo
directory_structure[].custom_metadata.tagsTag listArray of Objects[{ name: string, is_system: bool }]No
directory_structure[].custom_metadata.kvpKey-value pairsArray of Objects[{ metadata_id, key, value, type, is_system }]No
directory_structure[].custom_metadata.taxonomyTaxonomy entriesArray of Objects[{ metadata_id, version_id, title, code }]No
{
"directory_structure": [
{
"name": "Folder 1",
"is_private": false,
"type": "Folder",
"project_id": "string",
"description": "string",
"children": [],
"custom_metadata": {
"tags": [
{ "name": "string", "is_system": false }
],
"kvp": [
{
"metadata_id": "string",
"key": "string",
"value": "string",
"type": "string",
"is_system": false
}
],
"taxonomy": [
{
"metadata_id": "string",
"version_id": "string",
"title": "string",
"code": "string"
}
]
}
}
]
}

Response

{
"status_code": "201",
"message": "Sucessfully added children to parent directory"
}
  • Other Responses
    • 206 Partially added — some directories were added successfully
    • 400 Connection error
    • 404 Not found
    • 409 Conflict
    • 422 Validation Error
    • 500 Internal server error

Usage

import requests

folder_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/directory/{folder_id}"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

payload = {
"directory_structure": [
{
"name": "Folder 1",
"is_private": False,
"type": "Folder",
"description": "A new folder",
"children": [],
"custom_metadata": {
"tags": [{"name": "tag1", "is_system": False}],
"kvp": [
{
"metadata_id": "meta-uuid",
"key": "key1",
"value": "value1",
"type": "string",
"is_system": False
}
],
"taxonomy": [
{
"metadata_id": "tax-uuid",
"version_id": "v1-uuid",
"title": "Taxonomy Title",
"code": "TAX001"
}
]
}
}
]
}

response = requests.post(url, headers=headers, json=payload)

if response.status_code in (200, 201):
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Directory Deletion Endpoint

  • Method: DELETE
  • Path: https://api.kadal.ai/cl/api/v1/directory/{folder_id}
  • Summary: Deletes a directory and its contents.

Description

Deletes a directory that is other than a root directory and all its underlying directories.

Request

  • Query Parameters
    • folder_id (path): UUID of the directory to delete
    • ext_user_id_ref (query, optional): External user ID reference

Response

{
"status_code": "200",
"message": "Successfully deleted directory"
}

Usage

import requests

token = "YOUR_TOKEN"
folder_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/directory/root/children/{folder_id}"
headers = {
"Authorization": f"Bearer <token>"
}

response = requests.delete(url, headers=headers)
print(response.json())

Bulk Directory Retrieval Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v1/directory/details/bulk
  • Summary: Gets information about multiple directories.

Description

Gets folder information for multiple folders and shows information for all children present inside each requested directory.

Request

  • Query Parameters
    • ext_user_id_ref (optional): External user ID reference
  • Payload
{
"folder_ids": [
"1ea3d628-f555-41c7-8101-c56a65087bab",
"2fb4d839-g666-52d8-9212-d67b76198bac"
]
}

Response

{
"status_code": "200",
"message": "Directories found",
"data": [{
"name": "Directory Name",
"folder_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"type": "Folder",
"is_private": false,
"custom_metadata": {},
"children": []
}]
}

Directory Search Endpoint

  • Method: POST
  • Path: https://api.kadal.ai//cl/api/v1/directory/aggregate/details
  • Summary: Searches for directories based on a query string.

Description

Gets all folder information for a tenant matching the search criteria.

Request

  • Query Parameters
    • query_string (optional): Query string to search for folders
    • sort_by (optional): Sorting field (default: updated_at)
    • order (optional): Sort order (default: asc)
    • page_no (optional): Page number (default: 1)
    • page_size (optional): Page size (default: 20)
    • ext_user_id_ref (optional): External user ID reference

Response

{
"status_code": "200",
"message": "Directories found",
"data": {
"total": 50,
"page": 1,
"size": 20,
"results": [{
"name": "Directory Name",
"folder_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"type": "Folder",
"is_private": false,
"custom_metadata": {}
}]
}
}

My Folder APIs

My Folder Upsert Endpoint

  • Method: GET
  • Path: https://api.kadal.ai/cl/api/v1/my_folder
  • Summary: Gets a user's private folder or creates it if it doesn't exist.

Description

Gets the private folder of a user. If the private folder does not exist, it will be created.

Response

{
"status_code": "200",
"message": "Successfully retrieved my_folder",
"my_folder_directory_id": "0ad38b25-f71a-48e5-b649-c912a5350f40"
}
  • Other Responses
    • 404 Not Found: Root directory not found (required to create my_folder)

Notes

  • The my_folder directory is created as a private folder under the tenant's root directory
  • The folder has chat_interface_only: true set in its custom metadata
  • Only the owner can access their my_folder directory

Usage

import requests

url = "https://api.kadal.ai/cl/api/v1/my_folder"
headers = {
"Authorization": "Bearer <your_token>"
}

response = requests.get(url, headers=headers)
print(response.json())

Get Objects Content API

  • Method: GET
  • Path: https://api.kadal.ai/cl/api/v1/objects/{object_id}/content
  • Summary: Get object content by ID and type.

Description

Get object content by ID and type (e.g. toc, extracted_text, summary, etc.)

Request

  • Path Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
object_idObject IDstringUUIDrequired
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
typeContent type to retrievestringextracted_text, summary_text, content_text, tocoptional (default: toc)
ext_user_id_refExternal user ID referencestringUUIDoptional

Response

{
"status_code": 200,
"message": "Object content retrieved successfully",
"data": [
"This document outlines the professional profile and projects of a data scientist with over three years of experience. The individual possesses expertise in advanced data analysis"
],
"breadcrumb": []
}
  • Other Responses
    • 404 Not Found: Object not found
    • 400 Bad Request: Invalid parameters

Usage

Python Example:

import requests

object_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/objects/{object_id}/content"
headers = {
"Authorization": "Bearer <your_token>"
}
params = {
"type": "summary_text"
}

response = requests.get(url, headers=headers, params=params)
print(response.json())

cURL Example:

curl -X 'GET' \
'https://api.kadal.ai/cl/api/v1/objects/00680ef7-9e14-4e21-b68b-b74e5b0ab613/content?type=summary_text' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <your_token>'

Objects V2 APIs

Object Creation Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v2/objects
  • Summary: Creates a new object in the repository.

Description

Creates a new object in the object repository. The source_category under system_metadata can be KnowledgeBase/Guideline/OutputTemplate.

Request

FieldTypeDescriptionValidation
object_idstringOptional UUID for the objectUUID format
titlestringObject titleRequired
descriptionstringObject descriptionOptional
system_metadataobjectSystem metadataRequired
system_metadata.sourcestringSource of the objectRequired
system_metadata.source_categorystringCategory (KnowledgeBase/Guideline/OutputTemplate)Required
system_metadata.is_privatebooleanPrivacy flagRequired
system_metadata.mime_typestringMIME type of objectRequired for files
system_metadata.file_extensionstringFile extensionRequired for files
system_metadata.file_sizenumberSize in bytesRequired for files
system_metadata.is_latest_versionbooleanLatest version flagRequired
custom_metadataobjectCustom metadataOptional
custom_metadata.kvpobjectKey-value pairsOptional
custom_metadata.tagsarrayTags listOptional
custom_metadata.taxonomyarrayTaxonomy informationOptional
{
"object_id": "optional-uuid-if-client-wants-to-specify",
"title": "Object Title",
"description": "Object Description",
"system_metadata": {
"source": "KnowledgeBase",
"source_category": "Guideline",
"is_private": false,
"mime_type": "application/pdf",
"file_extension": "pdf",
"file_size": 1024,
"is_latest_version": true
},
"custom_metadata": {
"kvp": {
"key1": "value1"
},
"tags": [
"tag1"
],
"taxonomy": [
{
"uuid": "taxonomy-id",
"title": "Taxonomy Title"
}
]
}
}

Response

{
"status": "200",
"message": "Object created successfully",
"data": {
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"version_id": "v1"
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/objects"
headers = {
"Authorization": "Bearer <your_token>"
}
payload = {
"title": "Object Title",
"description": "Object Description",
"system_metadata": {
"source": "KnowledgeBase",
"source_category": "Guideline",
"is_private": False,
"mime_type": "application/pdf",
"file_extension": "pdf",
"file_size": 1024,
"is_latest_version": True
},
"custom_metadata": {
"kvp": {"key1": "value1"},
"tags": ["tag1"],
"taxonomy": [{"uuid": "taxonomy-id", "title": "Taxonomy Title"}]
}
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Object Update Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v2/objects/{object_id}
  • Summary: Updates an existing object's latest version.

Description

Updates an object in the repository. Can update metadata and content.

Request

  • Query Parameters
    • object_id (path): UUID of the object to update
  • Payload
FieldTypeDescriptionValidation
titlestringUpdated titleOptional
descriptionstringUpdated descriptionOptional
system_metadataobjectUpdated system metadataOptional
system_metadata.is_privatebooleanUpdated privacy flagOptional
system_metadata.mime_typestringUpdated MIME typeOptional
system_metadata.file_extensionstringUpdated file extensionOptional
system_metadata.file_sizenumberUpdated size in bytesOptional
custom_metadataobjectUpdated custom metadataOptional
custom_metadata.kvpobjectUpdated key-value pairsOptional
custom_metadata.tagsarrayUpdated tags listOptional
custom_metadata.taxonomyarrayUpdated taxonomy infoOptional
{
"title": "Updated Title",
"description": "Updated Description",
"system_metadata": {
"is_private": true,
"mime_type": "application/pdf",
"file_extension": "pdf",
"file_size": 2048
},
"custom_metadata": {
"kvp": {
"key1": "updated_value"
},
"tags": [
"new_tag"
],
"taxonomy": [
{
"uuid": "new-taxonomy-id",
"title": "New Taxonomy"
}
]
}
}

Response

{
"status": "200",
"message": "Object updated successfully",
"data": {
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"version_id": "v2"
}
}

Usage

import requests

object_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v2/objects/{object_id}"
headers = {
"Authorization": "Bearer <your_token>"
}
payload = {
"title": "Updated Title",
"description": "Updated Description",
"system_metadata": {
"is_private": True,
"mime_type": "application/pdf",
"file_extension": "pdf",
"file_size": 2048
},
"custom_metadata": {
"kvp": {"key1": "updated_value"},
"tags": ["new_tag"],
"taxonomy": [{"uuid": "new-taxonomy-id", "title": "New Taxonomy"}]
}
}

response = requests.put(url, headers=headers, json=payload)
print(response.json())

Object Retrieval Endpoint

  • Method: GET
  • Path: https://api.kadal.ai/cl/api/v2/objects/{object_id}
  • Summary: Retrieves an object by ID.

Description

Gets object details including all metadata and versions.

Request

  • Query Parameters
    • object_id (path): UUID of the object to retrieve

Response

{
"status": "200",
"message": "Object found",
"data": {
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"title": "Object Title",
"description": "Object Description",
"system_metadata": {
"source": "KnowledgeBase",
"source_category": "Guideline",
"is_private": false,
"mime_type": "application/pdf",
"file_extension": "pdf",
"file_size": 1024,
"is_latest_version": true,
"created_by": "user-id",
"created_by_name": "User Name",
"created_at": "2024-08-05T12:31:23.939Z",
"updated_by": "user-id",
"updated_by_name": "User Name",
"updated_at": "2024-08-05T18:36:02.772Z"
},
"custom_metadata": {
"kvp": {
"key1": "value1"
},
"tags": [
"tag1"
],
"taxonomy": [
{
"uuid": "taxonomy-id",
"title": "Taxonomy Title"
}
]
},
"versions": [
{
"version_id": "v1",
"created_at": "2024-08-05T12:31:23.939Z",
"created_by": "user-id",
"created_by_name": "User Name"
}
]
}
}

Usaage

import requests

object_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/objects/{object_id}"
headers = {
"Authorization": "Bearer <your_token>"
}

response = requests.get(url, headers=headers)
print(response.json())

Object Deletion Endpoint

  • Method: DELETE
  • Path: https://api.kadal.ai/cl/api/v2/objects/{object_id}
  • Summary: Deletes an object from the repository.

Description

Deletes the specified object and all its versions.

Request

  • Query Parameters

    • object_id (path): UUID of the object to delete

Response

{
"status": "200",
"message": "Object deleted successfully"
}

Usage

import requests

object_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v2/objects/{object_id}"
headers = {
"Authorization": "Bearer <your_token>"
}

response = requests.delete(url, headers=headers)
print(response.json())

Objects Listing Endpoint

  • Method: GET
  • Path: https://api.kadal.ai/cl/api/v2/objects
  • Summary: Lists all objects in the repository.

Description

Gets a paginated list of all objects.

Request

  • Query Parameters
    • page (optional): Page number (default: 1)
    • size (optional): Items per page (default: 20)
    • sort_by (optional): Field to sort by (title/updated_at)
    • order (optional): Sort order (asc/desc)

Response

{
"status": "200",
"message": "Objects found",
"data": {
"total": 50,
"page": 1,
"size": 20,
"results": [
{
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"title": "Object Title",
"description": "Object Description",
"system_metadata": {
"source": "KnowledgeBase",
"source_category": "Guideline",
"is_private": false,
"mime_type": "application/pdf",
"file_extension": "pdf",
"file_size": 1024,
"is_latest_version": true,
"created_at": "2024-08-05T12:31:23.939Z",
"updated_at": "2024-08-05T18:36:02.772Z"
},
"custom_metadata": {
"kvp": {
"key1": "value1"
},
"tags": ["tag1"],
"taxonomy": [{
"uuid": "taxonomy-id",
"title": "Taxonomy Title"
}]
}
}
]
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/objects"
headers = {
"Authorization": "Bearer <your_token>"
}
params = {
"page": 1,
"size": 20,
"sort_by": "title",
"order": "asc"
}

response = requests.get(url, headers=headers, params=params)
print(response.json())

Move bulk folders and objects Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v2/objects/move/bulk
  • Summary: Move bulk folders and objects to a folder

Description

Move bulk folders and objects to a folder

Request

FieldTypeDescriptionValidation
object_idsarrayList of object UUIDsEach item UUID
folder_idsarrayList of folder UUIDsEach item UUID
update_fieldsobjectFields to updateRequired
update_fields.parent_idstringParent folder/object IDUUID format
update_fields.is_privatebooleanPrivacy flag for the object/folderRequired (true/false)
{
"object_ids": [
"string"
],
"folder_ids": [
"string"
],
"update_fields": {
"parent_id": "string",
"is_private": true
}
}

Response

{
"status": "string",
"message": "string",
"data": {
"status": "string",
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2025-12-22T06:57:55.139Z",
"updated_at": "2025-12-22T06:57:55.139Z",
"deleted_at": "2025-12-22T06:57:55.139Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"metadata": {},
"media": {},
"usage_count": 0,
"license_expiration_date": "2025-12-22T06:57:55.139Z",
"license_validity": true
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/objects/move/bulk"
headers = {
"Authorization": "Bearer <your_token>"
}

payload = {
"object_ids": [
"string"
],
"folder_ids": [
"string"
],
"update_fields": {
"parent_id": "string",
"is_private": true
}
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Create a new object association for usage count and associated objects Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v2/objects/associations
  • Summary: Create a new object association for usage count and associated objects. Here origin means the assets embedded. Here destination means the document where the assets are being embedded. Here mode can be ADD or REMOVE only.

Description

Create a new object association for usage count and associated objects. Here origin means the assets embedded. Here destination means the document where the assets are being embedded. Here mode can be ADD or REMOVE only.

Request

FieldTypeDescriptionValidation
idstringUnique identifier for the relationshipUUID format
typestringType of relationship (e.g., isEmbeddedOf)Required
originobjectOrigin object detailsRequired
origin.object_idstringID of the origin objectUUID format
origin.version_idstringVersion identifier of the origin objectUUID format
origin.version_nonumberVersion number of the origin objectInteger, Required
destinationobjectDestination object detailsRequired
destination.object_idstringID of the destination objectUUID format
destination.version_idstringVersion identifier of the destination objectUUID format
sourcestringSource reference or metadataOptional
modestringOperation mode (e.g., ADD, REMOVE, UPDATE)Enum: ADD/REMOVE/UPDATE
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "isEmbeddedOf",
"origin": {
"object_id": "",
"version_id": "",
"version_no": 1
},
"destination": {
"object_id": "",
"version_id": ""
},
"source": "",
"mode": "ADD"
}

Response

{
"id": "",
"type": "isEmbeddedOf",
"sequence_number": 1,
"origin_object_id": "string",
"origin_version_id": "string",
"origin_version_no": 1,
"origin_title": "",
"origin_object_type": "",
"origin_file_name": "",
"origin_asset_location": "",
"origin_file_extension": "",
"associated_at": "2025-12-22T07:01:04.343Z",
"associated_by": "",
"destination_object_id": "string",
"destination_version_id": "string"
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/objects/associations"
headers = {
"Authorization": "Bearer <your_token>"
}

payload = {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "isEmbeddedOf",
"origin": {
"object_id": "",
"version_id": "",
"version_no": 1
},
"destination": {
"object_id": "",
"version_id": ""
},
"source": "",
"mode": "ADD"
}

response = requests.put(url, headers=headers, json=payload)
print(response.json())

Deassociate the objects in Bulk Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v2/objects/deassociations/bulk
  • Summary: Deassociate the objects in Bulk

Description

Deassociate the objects in Bulk

Request

FieldTypeDescriptionValidation
idsarrayList of object identifiers to updateEach item UUID, Optional
modestringOperation mode for the requestEnum: REMOVE
{
"ids": [],
"mode": "REMOVE"
}

Response

{
"status": "string",
"message": "string",
"data": [
{
"ids": [],
"mode": "REMOVE"
}
]
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/objects/deassociations/bulk"
headers = {
"Authorization": "Bearer <your_token>"
}

payload = {
"ids": [],
"mode": "REMOVE"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Get All Asset lists embedded for an Object Id for a specific version Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v2/objects/associations/<object_id>/versions/<version_id>
  • Summary: Get All Asset lists embedded for an Object Id for a specific version.

Description

Get All Asset lists embedded for an Object Id for a specific version.

Request

FieldTypeDescriptionValidation
object_idstringUUID for the objectUUID format
version_idstringUUID for the objectUUID format

Response

{
"status": "string",
"message": "string",
"data": [
{
"id": "",
"type": "isEmbeddedOf",
"sequence_number": 1,
"origin_object_id": "string",
"origin_version_id": "string",
"origin_version_no": 1,
"origin_title": "",
"origin_object_type": "",
"origin_file_name": "",
"origin_asset_location": "",
"origin_file_extension": "",
"associated_at": "2025-12-22T07:05:38.960Z",
"associated_by": "",
"destination_object_id": "string",
"destination_version_id": "string"
}
]
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/objects/associations/<object_id>/versions/<version_id>"
headers = {
"Authorization": "Bearer <your_token>"
}

response = requests.get(url, headers=headers, json=payload)
print(response.json())

Update the file for object in the object repository Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v2/objects/upload-file-from-generated-asset
  • Summary: Update the file for object in the object repository.

Description

Update the file for object in the object repository

Request

FieldTypeDescriptionValidation
titlestringTitle of the asset or chatRequired
asset_idstringUnique identifier for the assetUUID format
chat_idstringUnique identifier for the chatUUID format
is_agent_chatbooleanFlag indicating if the chat is agent-basedRequired (true/false)
parent_folder_idstringIdentifier of the parent folderUUID format, Optional
is_privatebooleanPrivacy flag for the asset/chatRequired (true/false)
{
"title": "string",
"asset_id": "string",
"chat_id": "string",
"is_agent_chat": true,
"parent_folder_id": "string",
"is_private": false
}

Response

{
"status": "string",
"message": "string",
"data": {
"status": "string",
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2025-12-22T09:09:21.962Z",
"updated_at": "2025-12-22T09:09:21.962Z",
"deleted_at": "2025-12-22T09:09:21.962Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"metadata": {},
"media": {},
"usage_count": 0,
"license_expiration_date": "2025-12-22T09:09:21.962Z",
"license_validity": true
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/objects/upload-file-from-generated-asset"
headers = {
"Authorization": "Bearer <your_token>"
}

payload = {
"title": "string",
"asset_id": "string",
"chat_id": "string",
"is_agent_chat": true,
"parent_folder_id": "string",
"is_private": false
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Chunks V2 APIs

Chunk Search Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v2/chunks/search
  • Summary: Search for chunks based on similarity search.

Description

Performs a semantic similarity search across chunks.

Request

{
"query": "search text",
"filters": {
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"chunk_type": "text",
"metadata": {
"key": "value"
}
},
"top_k": 10
}

Response

{
"status_code": "200",
"message": "Chunks found",
"data": {
"chunks": [{
"chunk_id": "chunk123",
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"content": "chunk content",
"metadata": {
"key": "value"
},
"chunk_type": "text",
"similarity_score": 0.95
}]
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/chunks/search"
headers = {
"Authorization": "Bearer <your_token>"
}
payload = {
"query": "search text",
"filters": {
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"chunk_type": "text"
},
"top_k": 10
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Chunk Creation Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v2/chunks
  • Summary: Creates a new chunk in the repository.

Description

Creates a new chunk with content and metadata.

Request

FieldTypeDescriptionValidation
object_idstringUUID of the associated objectRequired, UUID format
contentstringChunk contentRequired
metadataobjectMetadata for the chunkOptional
metadata.keystringMetadata keyOptional
metadata.valuestringMetadata valueOptional
chunk_typestringType of the chunkRequired, Enum: text, file
embeddingobjectEmbedding informationRequired for vector chunks
embedding.vectorarrayVector array (float)Required for vector chunks
embedding.modelstringModel used for embeddingRequired for vector chunks
{
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"content": "chunk content",
"metadata": {
"key": "value"
},
"chunk_type": "text",
"embedding": {
"vector": [0.1, 0.2, 0.3],
"model": "gte-small"
}
}

Response

{
"status_code": "201",
"message": "Chunk created",
"data": {
"chunk_id": "chunk123"
}
}

Usage

import requests
import numpy as np

url = "https://api.kadal.ai/cl/api/v2/chunks"
headers = {
"Authorization": "Bearer <your_token>"
}
payload = {
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"content": "chunk content",
"metadata": {"key": "value"},
"chunk_type": "text",
"embedding": {
"vector": np.random.rand(384).tolist(), # Example vector
"model": "gte-small"
}
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Chunk Update Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v2/chunks/{chunk_id}
  • Summary: Updates an existing chunk.

Description

Updates content or metadata of an existing chunk.

Request

  • Query Parameters
    • chunk_id (path): ID of the chunk to update
  • Payload
    {
    "content": "updated content",
    "metadata": {
    "key": "new_value"
    }
    }

Response

{
"status_code": "200",
"message": "Chunk updated"
}

Usage

import requests

chunk_id = "chunk123"
url = f"https://api.kadal.ai/cl/api/v2/chunks/{chunk_id}"
headers = {
"Authorization": "Bearer <your_token>"
}
payload = {
"content": "updated content",
"metadata": {"key": "new_value"}
}

response = requests.put(url, headers=headers, json=payload)
print(response.json())

Chunk Deletion Endpoint

  • Method: DELETE
  • Path: https://api.kadal.ai/cl/api/v2/chunks/{chunk_id}
  • Summary: Deletes a chunk.

Description

Removes a chunk from the repository.

Request

  • Query Parameters
    • chunk_id (path): ID of the chunk to delete

Response

{
"status_code": "200",
"message": "Chunk deleted"
}

Usage

import requests

chunk_id = "chunk123"
url = f"https://api.kadal.ai/cl/api/v2/chunks/{chunk_id}"
headers = {
"Authorization": "Bearer <your_token>"
}

response = requests.delete(url, headers=headers)
print(response.json())

Bulk Chunks Creation Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v2/chunks/bulk
  • Summary: Creates multiple chunks in a single request.

Description

Bulk creation of chunks.

Request

{
"chunks": [{
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"content": "chunk content 1",
"metadata": {
"key": "value1"
}
},
{
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"content": "chunk content 2",
"metadata": {
"key": "value2"
}
}]
}

Response

{
"status_code": "201",
"message": "Chunks created",
"data": {
"chunk_ids": ["chunk123", "chunk124"]
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/chunks/bulk"
headers = {
"Authorization": "Bearer <your_token>"
}
payload = {
"chunks": [{
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"content": "chunk content 1",
"metadata": {"key": "value1"}
},
{
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"content": "chunk content 2",
"metadata": {"key": "value2"}
}]
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Bulk Chunks Deletion Endpoint

  • Method: DELETE
  • Path: https://api.kadal.ai/cl/api/v2/chunks/object/bulk
  • Summary: Deletes all chunks for an object.

Description

Removes all chunks associated with specified objects.

Request

{
"object_ids": [
"1ea3d628-f555-41c7-8101-c56a65087bab",
"2fb4d839-g666-52d8-9212-d67b76198bac"
]
}

Response

{
"status_code": "200",
"message": "Object chunks deleted"
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v2/chunks/object/bulk"
headers = {
"Authorization": "Bearer <your_token>"
}
payload = {
"object_ids": [
"1ea3d628-f555-41c7-8101-c56a65087bab",
"2fb4d839-g666-52d8-9212-d67b76198bac"
]
}

response = requests.delete(url, headers=headers, json=payload)
print(response.json())

File Upload V3 APIs

Upload Files

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v3/file_upload
  • Summary: Upload files to the chat interface.

Description

Uploads files to the chat interface with support for various file types.

Request

  • Query Parameters
    • files (form-data, required): List of files to upload
    • folder_id (query, required): The my folder ID where files should be uploaded
    • source_category (query, required): Category of the source (KnowledgeBase/Guideline/OutputTemplate/InputFile)
    • session_id (query, required): Chat interface session ID

Response

{
"status_code": "200",
"message": "Files uploaded successfully",
"data": {
"files": [{
"file_name": "document.pdf",
"object_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"status": "uploaded"
}]
}
}
  • Other Responses
    • 413 Payload Too Large: File size exceeds limit
    • 415 Unsupported Media Type: Invalid file type

Usage

import requests

url = "https://api.kadal.ai/cl/api/v3/file_upload"
headers = {
"Authorization": "Bearer <your_token>"
}
params = {
"folder_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"source_category": "KnowledgeBase",
"session_id": "5678"
}
files = {
'files': [
('document.pdf', open('document.pdf', 'rb'), 'application/pdf'),
('image.jpg', open('image.jpg', 'rb'), 'image/jpeg')
]
}

response = requests.post(url, headers=headers, params=params, files=files)
print(response.json())

Project APIs

Create Project Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v1/project
  • Summary: Create a new project in the folders collection with schema_version 2.0.

Description

Creates a new project under a specified parent folder. Projects are distinct from regular folders and support team membership, agent associations, and project-level settings.

Request

  • Content-Type: application/json
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referencestringUUIDNo
ParameterDescriptionData TypeAllowed ValuesRequired
nameProject display name (1–255 characters)StringYes
parent_idParent folder UUID; cannot point to another ProjectString (UUID)Yes
descriptionProject description (min 1 character)StringYes
iconValid icon reference or URLStringNo
custom_metadataExtended metadataObject{ kvp: [], tags: [], taxonomy: [] }No
settingsProject-level settingsObject{ search_scope: string, version: string }No

Response

{
"status": "success",
"data": {
"schema_version": "2.0",
"tenant_id": "<tenant-uuid>",
"folder_id": "<project-uuid>",
"name": "My Project",
"description": "A new project for organizing content",
"icon": "icon_project_default",
"type": "Project",
"parent_id": "<parent-folder-uuid>",
"is_private": false,
"children": [],
"custom_metadata": {
"kvp": [
{ "color": "red" }
],
"tags": [
{ "name": "tag1", "is_system": false }
],
"taxonomy": []
},
"team": [
{
"user_id": "<user-uuid>",
"user_name": "user@example.com",
"user_email": "user@example.com",
"role": "Creator",
"role_id": null,
"added_on": "2026-06-04T09:33:15.798293Z",
"added_by": "<user-uuid>",
"added_by_name": "user@example.com"
}
],
"agents": [],
"settings": {
"search_scope": "current_project",
"version": "1.0"
},
"created_by": "<user-uuid>",
"created_by_name": "user@example.com",
"created_on": "2026-06-04T09:33:15.798293Z",
"updated_by": null,
"updated_by_name": null,
"updated_on": "2026-06-04T09:33:15.798293Z",
"duplicate_status": null,
"is_deleted": false,
"deleted_by": null,
"deleted_on": null
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v1/project"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = {
"name": "My Project",
"parent_id": "1ea3d628-f555-41c7-8101-c56a65087bab",
"description": "A new project for organizing content",
"icon": "https://example.com/icon.svg",
"custom_metadata": {
"kvp": [],
"tags": [],
"taxonomy": []
},
"settings": {
"search_scope": "project",
"version": "1.0"
}
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Update Project Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}
  • Summary: Update an existing project.

Description

Updates an existing project's metadata. Enforced rules:

  • type and team are immutable via this endpoint.
  • is_private cannot be changed to true.
  • parent_id cannot point to another Project.
  • Requesting user must be Creator, Editor, or Tenant Admin.
  • description is mandatory if included in the request.

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUID to updateString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referencestringUUIDNo
ParameterDescriptionData TypeAllowed ValuesRequired
nameProject display name (1–255 characters)StringNo
descriptionProject description (min 1 character)StringNo
iconValid icon reference or URLStringNo
custom_metadataExtended metadataObject{ kvp: [], tags: [] }No
settingsProject-level settingsObject{ search_scope: string }No

Response

{
"status": "success",
"data": {
"folder_id": "<project-uuid>",
"name": "Updated Project Name",
"description": "Updated project description",
"icon": "",
"updated_on": "2026-06-04T09:34:18.117231Z",
"updated_by": "<user-uuid>"
}
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = {
"name": "Updated Project Name",
"description": "Updated project description",
"icon": "https://example.com/new-icon.svg",
"custom_metadata": {
"kvp": [],
"tags": ["updated"]
},
"settings": {
"search_scope": "tenant"
}
}

response = requests.put(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Get Project Endpoint

  • Method: GET
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}
  • Summary: Get a project by ID.

Description

Retrieves a project by its UUID. Access rules:

  • Team members and Tenant Admins receive full project details.
  • Non-members receive a restricted response (name, id, type only).

Request

  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUIDString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
include_childrenFetch first-level child foldersBooleanDefault: falseNo
include_teamInclude team members arrayBooleanDefault: trueNo
include_agentsInclude agents arrayBooleanDefault: trueNo
ext_user_id_refExternal user ID referenceStringUUIDNo

Response

{
"status": "success",
"data": {
"folder_id": "<project-uuid>",
"tenant_id": "<tenant-uuid>",
"name": "My Project",
"description": "Project description",
"icon": "",
"type": "Project",
"parent_id": "<parent-folder-uuid>",
"is_private": false,
"created_by": "<user-uuid>",
"created_by_name": "user@example.com",
"created_on": "2026-04-14T11:07:00.458899Z",
"updated_by": "<user-uuid>",
"updated_by_name": "user@example.com",
"updated_on": "2026-04-27T11:46:36.996792Z",
"custom_metadata": {
"kvp": [],
"tags": [],
"taxonomy": []
},
"settings": {
"search_scope": "current_project",
"version": "1.0"
},
"schema_version": "2.0",
"duplicate_status": null,
"access_level": "Editor",
"is_starred": false,
"team": [
{
"user_id": "<user-uuid>",
"user_name": "user@example.com",
"user_email": "user@example.com",
"role": "Creator",
"role_id": null,
"added_on": "2026-04-14T11:07:00.458899Z",
"added_by": "<user-uuid>",
"added_by_name": "user@example.com",
"firstName": "Jane",
"lastName": "Doe",
"is_tenant_user_active": "active"
},
{
"user_id": "<member-uuid>",
"user_name": "Member User",
"user_email": "member@example.com",
"role": "Editor",
"role_id": "<role-uuid>",
"added_on": "2026-04-14T11:07:57.680761Z",
"added_by": "<user-uuid>",
"added_by_name": "user@example.com",
"firstName": "Member",
"lastName": "User",
"is_tenant_user_active": "active"
}
],
"children": [
{
"tenant_id": "<tenant-uuid>",
"name": "folder 1",
"is_private": false,
"type": "Folder",
"is_project": true,
"project_id": "<project-uuid>",
"description": "",
"parent_id": "<project-uuid>",
"folder_id": "<folder-uuid>",
"created_by": "<user-uuid>",
"created_by_name": "user@example.com",
"created_on": "2026-04-28 10:54:31.354050",
"updated_on": "2026-04-28 10:54:31.354058",
"updated_by": null,
"updated_by_name": null,
"custom_metadata": {
"tags": [],
"kvp": [],
"taxonomy": []
},
"children": [],
"is_deleted": false,
"deleted_by": null,
"deleted_on": null
}
]
}
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

params = {
"include_children": False,
"include_team": True,
"include_agents": True
}

response = requests.get(url, headers=headers, params=params)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Delete Project Endpoint

  • Method: DELETE
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}
  • Summary: Delete a project.

Description

Deletes a project. Enforced rules:

  • Only Creator or Tenant Admin can delete.
  • confirm parameter must be true.
  • If cascade=false and children exist, returns error 400.
  • Cascade deletes all child folders, objects, and team access.

Request

  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUID to deleteString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
confirmMust be true to confirm deletionBooleantrueYes
cascadeDelete all children if trueBooleanDefault: falseNo
ext_user_id_refExternal user ID referenceStringUUIDNo

Response

{
"status": "success",
"data": {
"folder_id": "<project-uuid>",
"deleted_on": "2026-04-16T12:56:08.322597Z",
"message": "Project deleted successfully"
}
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

params = {
"confirm": True,
"cascade": True
}

response = requests.delete(url, headers=headers, params=params)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

List Projects Endpoint

  • Method: GET
  • Path: https://api.kadal.ai/cl/api/v1/projects
  • Summary: List all projects for the authenticated tenant with pagination, filtering, and sorting.

Description

Returns all projects for the authenticated tenant. Access levels:

  • member — only projects the user belongs to.
  • restricted — only non-member projects.
  • all — everything.

Each project entry carries an access_level field reflecting the requesting user's role or restricted.

Request

  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
pagePage number (1-based)Integer ≥ 1Default: 1No
page_sizeResults per page (max 100)Integer 1–100Default: 20No
parent_idFilter by parent folder UUIDStringUUIDNo
access_levelFilter by access levelStringmember, restricted, all; Default: "all"No
sort_bySort fieldStringcreated_on, updated_on, name; Default: "updated_on"No
sort_orderSort directionStringasc, desc; Default: "desc"No
ext_user_id_refExternal user ID referenceStringUUIDNo

Response

{
"status": "success",
"data": {
"projects": [
{
"folder_id": "<project-uuid>",
"name": "My Project",
"description": "Project description",
"icon": "",
"created_on": "2026-05-29T05:13:14.763266Z",
"updated_on": "2026-05-29T05:13:14.763266Z",
"parent_id": "<parent-folder-uuid>",
"custom_metadata": {
"kvp": [],
"tags": [],
"taxonomy": []
},
"settings": {
"search_scope": "current_project",
"version": "1.0"
},
"access_level": "Tenant Admin",
"is_starred": false
}
],
"pagination": {
"page": 1,
"page_size": 20,
"total_count": 98,
"total_pages": 5
}
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v1/projects"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

params = {
"page": 1,
"page_size": 20,
"access_level": "all",
"sort_by": "updated_on",
"sort_order": "desc"
}

response = requests.get(url, headers=headers, params=params)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Add Team Member Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}/team
  • Summary: Add a team member to the project.

Description

Adds one or more team members to the project. Enforced rules:

  • Only Creator, Editor, or Tenant Admin can add members.
  • User cannot already be in the team.
  • Role must be valid (Editor, Viewer, Commenter).
  • Cannot add user with Creator role.

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUIDString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo

Array of team member objects:

ParameterDescriptionData TypeAllowed ValuesRequired
user_idUUID of the team memberString (UUID)Yes
user_nameDisplay name (ignored — resolved from DB)StringDefault: ""No
user_emailEmail (ignored — resolved from DB)StringDefault: ""No
roleRole of the team memberStringAdmin, Editor, Viewer, Commenter, No Access, Repository ManagerYes
role_idUUID of the global roleString (UUID)Yes

Response

{
"status": "success",
"data": {
"added": [
{
"user_id": "<user-uuid>",
"user_name": "Member User",
"user_email": "member@example.com",
"role": "Viewer",
"role_id": "<role-uuid>",
"added_on": "2026-06-04T09:40:06.178363Z",
"added_by": "<requesting-user-uuid>",
"added_by_name": "user@example.com"
}
]
}
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}/team"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = [
{
"user_id": "user-uuid-here",
"user_name": "John.Smith",
"user_email": "John.Smith@mail.com",
"role": "Editor",
"role_id": "role-uuid-here"
}
]

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Update Team Member Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}/team
  • Summary: Bulk update team members: update role or revoke access.

Description

Bulk updates team members' roles or revokes their access. Enforced rules:

  • Cannot change Creator's role.
  • Only Creator or Tenant Admin can update roles.
  • New role must be valid (Editor, Viewer, Commenter).
  • Set revoke_access=true to remove a member instead of updating their role.

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUIDString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo

Array of update objects:

ParameterDescriptionData TypeAllowed ValuesRequired
user_idUUID of the team member to update or revokeString (UUID)Yes
roleNew role; required when revoke_access is falseStringAdmin, Editor, Viewer, Commenter, No Access, Repository ManagerNo
role_idUUID of the global role being assigned; required when revoke_access is falseString (UUID)No
revoke_accessIf true, remove user from team instead of updating roleBooleanDefault: falseNo

Response

{
"status": "success",
"data": {
"updated": [
{
"user_id": "<user-uuid>",
"role": "Admin"
}
],
"revoked": [],
"updated_on": "2026-06-04T09:37:43.731324Z",
"updated_by": "<requesting-user-uuid>"
}
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}/team"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = [
{
"user_id": "user-uuid-1",
"role": "Viewer",
"role_id": "role-uuid-here",
"revoke_access": False
},
{
"user_id": "user-uuid-2",
"revoke_access": True
}
]

response = requests.put(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Remove Team Members Endpoint

  • Method: DELETE
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}/team
  • Summary: Remove team member(s) from the project.

Description

Removes one or more team members from the project. Enforced rules:

  • Cannot remove Creator.
  • Only Creator or Tenant Admin can remove members.
  • Content created by removed user remains in the project.

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUIDString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo
ParameterDescriptionData TypeAllowed ValuesRequired
user_idList of user UUIDs to removeArray of Strings (non-empty)Yes

Response

{
"status": "success",
"message": "Team member(s) removed successfully"
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}/team"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = {
"user_id": ["user-uuid-1", "user-uuid-2"]
}

response = requests.delete(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Add Agent Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}/agents
  • Summary: Add one or more agents to the project.

Description

Adds agents to the project. Enforced rules:

  • Only Creator, Editor, or Tenant Admin can add agents.
  • No agent in the list can already be in the project agents array.
  • Duplicate agent_ids within the request are not allowed.
  • Total agent count cannot exceed 100.

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUIDString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo

Array of agent objects:

ParameterDescriptionData TypeAllowed ValuesRequired
agent_idUUID of the agentString (UUID)Yes
is_localWhether the agent is local to the projectBooleanDefault: trueNo
is_activeWhether the agent is activeBooleanDefault: trueNo

Response

{
"status": "success",
"data": {
"agents": [
{
"agent_id": "<agent-uuid>",
"is_local": false,
"is_active": true,
"created_on": "2026-06-04T09:38:56.322771Z",
"created_by": "<user-uuid>",
"created_by_name": "user@example.com"
}
]
}
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}/agents"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = [
{
"agent_id": "agent-uuid-here",
"is_local": True,
"is_active": True
}
]

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Remove Agents Endpoint

  • Method: DELETE
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}/agents
  • Summary: Remove agent(s) from the project.

Description

Removes one or more agents from the project. Enforced rules:

  • Only Creator, Editor, or Tenant Admin can remove agents.
  • Agent must exist in the project.

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUIDString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo
ParameterDescriptionData TypeAllowed ValuesRequired
agent_idList of agent UUIDs to removeArray of Strings (non-empty)Yes

Response

{
"status": "success",
"message": "Agent removed from project",
"data": {
"agent_id": [
"<agent-uuid-1>",
"<agent-uuid-2>"
],
"removed_on": "2026-02-25T07:54:52.758521Z"
}
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}/agents"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = {
"agent_id": ["agent-uuid-1", "agent-uuid-2"]
}

response = requests.delete(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Update Agent Endpoint

  • Method: PUT
  • Path: https://api.kadal.ai/cl/api/v1/project/{id}/agents/{agent_id}
  • Summary: Update an agent's status in the project.

Description

Updates an agent's active status within the project. Enforced rules:

  • Only Creator, Editor, or Tenant Admin can update agents.
  • Agent must exist in the project.

Request

  • Content-Type: application/json
  • Path Parameters
ParameterDescriptionData TypeRequired
idProject UUIDString (UUID)Yes
agent_idAgent UUIDString (UUID)Yes
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo
ParameterDescriptionData TypeAllowed ValuesRequired
is_activeWhether the agent should be activeBooleantrue, falseYes

Response

{
"status": "success",
"data": {
"agent_id": "<agent-uuid>",
"is_active": true,
"updated_on": "2026-02-25T07:52:42.134367Z"
}
}

Usage

import requests

project_id = "1ea3d628-f555-41c7-8101-c56a65087bab"
agent_id = "agent-uuid-here"
url = f"https://api.kadal.ai/cl/api/v1/project/{project_id}/agents/{agent_id}"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = {
"is_active": True
}

response = requests.put(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)

Move Content Endpoint

  • Method: POST
  • Path: https://api.kadal.ai/cl/api/v1/project/move
  • Summary: Move folders and/or objects into a different destination folder.

Description

Moves one or more folders or objects to a specified destination folder. Permissions are re-evaluated at the destination. If permissions are removed for any content, the permissions_removed array will list the affected items.

Request

  • Content-Type: application/json
  • Query Parameters
ParameterDescriptionData TypeAllowed ValuesRequired
ext_user_id_refExternal user ID referenceStringUUIDNo
ParameterDescriptionData TypeAllowed ValuesRequired
object_idsList of object UUIDs to moveArray of StringsUUIDsNo
folder_idsList of folder UUIDs to moveArray of StringsUUIDsNo
destination_folder_idTarget folder UUID to move content intoString (UUID)Yes

Response

{
"status": "success",
"data": {
"moved_count": 1,
"destination_folder_id": "<destination-folder-uuid>",
"permissions_removed": [],
"message": "Content moved successfully"
}
}

Usage

import requests

url = "https://api.kadal.ai/cl/api/v1/project/move"
token = "your_token_here"

headers = {
"Authorization": f"Bearer {token}"
}

data = {
"object_ids": ["object-uuid-1"],
"folder_ids": ["folder-uuid-1"],
"destination_folder_id": "destination-folder-uuid"
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)